package com.wyyc.common.city.repository;

import com.wyyc.entity.CitysEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Hwei~ on 2017/6/7.
 */
@Repository
@Transactional
public interface CityRepository extends PagingAndSortingRepository<CitysEntity,Integer>,JpaRepository<CitysEntity,Integer>{
    //根据城市代码查询
    @Query("FROM CitysEntity c where c.cityCode = ?1")
    CitysEntity findByCityCode(String CityCode);
}
